from django.shortcuts import render
from rest_framework.generics import ListAPIView, GenericAPIView
from rest_framework.response import Response

from apps.detail.models import DetailModel
from apps.index.models import ChartModel
from apps.index.serializers import ImgUrlSerializers, ListSerializers


class ImgUrlView(ListAPIView):
    queryset = ChartModel.objects.filter().all()
    serializer_class = ImgUrlSerializers


class ListView(ListAPIView):
    queryset = DetailModel.objects.all()
    serializer_class = ListSerializers
